﻿using System.Collections.Generic;
using System.Windows.Browser;

namespace jLight
{
    public class jQueryObjectCss : jQueryObjectBase
    {
        public object this[string index]
        {
            get { return ScriptObject.GetProperty(index); }
            set { ScriptObject.SetProperty(index, value); }
        }

        public double Left
        {
            get { return (double)ScriptObject.GetProperty("left"); }
            set { ScriptObject.SetProperty("left", value); }
        }

        public double Top
        {
            get
            {
                return (double)ScriptObject.GetProperty("top");
            }
            set
            {
                ScriptObject.SetProperty("top", value);
            }
        }

        public string Background
        {
            get { return (string)ScriptObject.GetProperty("background"); }
            set { ScriptObject.SetProperty("background", value); }
        }

        public string BackgroundAttachment
        {
            get { return (string)ScriptObject.GetProperty("background-attachment"); }
            set { ScriptObject.SetProperty("background-attachment", value); }
        }

        public string Scroll
        {
            get { return (string)ScriptObject.GetProperty("scroll"); }
            set { ScriptObject.SetProperty("scroll", value); }
        }

        public string BackgroundColor
        {
            get { return (string)ScriptObject.GetProperty("background-color"); }
            set { ScriptObject.SetProperty("background-color", value); }
        }

        public string BackgroundImage
        {
            get { return (string)ScriptObject.GetProperty("background-image"); }
            set { ScriptObject.SetProperty("background-image", value); }
        }

        public string BackgroundPosition
        {
            get { return (string)ScriptObject.GetProperty("background-position"); }
            set { ScriptObject.SetProperty("background-position", value); }
        }

        public string BackgroundRepeat
        {
            get { return (string)ScriptObject.GetProperty("background-repeat"); }
            set { ScriptObject.SetProperty("background-repeat", value); }
        }

        public string Border
        {
            get { return (string)ScriptObject.GetProperty("border"); }
            set { ScriptObject.SetProperty("border", value); }
        }

        public string Color
        {
            get { return (string)ScriptObject.GetProperty("color"); }
            set { ScriptObject.SetProperty("color", value); }
        }

        public string Position
        {
            get { return (string)ScriptObject.GetProperty("position"); }
            set { ScriptObject.SetProperty("position", value); }
        }

        public string BorderBottomStyle
        {
            get { return (string)ScriptObject.GetProperty("border-bottom-style"); }
            set { ScriptObject.SetProperty("border-bottom-style", value); }
        }

        public string BorderBottomWidth
        {
            get { return (string)ScriptObject.GetProperty("border-bottom-width"); }
            set { ScriptObject.SetProperty("border-bottom-width", value); }
        }

        public string BorderColor
        {
            get { return (string)ScriptObject.GetProperty("border-color"); }
            set { ScriptObject.SetProperty("border-color", value); }
        }

        public string BorderLeft
        {
            get { return (string)ScriptObject.GetProperty("border-left"); }
            set { ScriptObject.SetProperty("border-left", value); }
        }

        public string BorderLeftColor
        {
            get { return (string)ScriptObject.GetProperty("border-left-color"); }
            set { ScriptObject.SetProperty("border-left-color", value); }
        }

        public string BorderLeftStyle
        {
            get { return (string)ScriptObject.GetProperty("border-left-style"); }
            set { ScriptObject.SetProperty("border-left-style", value); }
        }

        public string BorderLeftWidth
        {
            get { return (string)ScriptObject.GetProperty("border-left-width"); }
            set { ScriptObject.SetProperty("border-left-width", value); }
        }

        public string BorderRight
        {
            get { return (string)ScriptObject.GetProperty("border-right"); }
            set { ScriptObject.SetProperty("border-right", value); }
        }

        public string BorderRightColor
        {
            get { return (string)ScriptObject.GetProperty("border-right-color"); }
            set { ScriptObject.SetProperty("border-right-color", value); }
        }

        public string BorderRightStyle
        {
            get { return (string)ScriptObject.GetProperty("border-right-style"); }
            set { ScriptObject.SetProperty("border-right-style", value); }
        }

        public string BorderRightWidth
        {
            get { return (string)ScriptObject.GetProperty("border-right-width"); }
            set { ScriptObject.SetProperty("border-right-width", value); }
        }

        public string BorderStyle
        {
            get { return (string)ScriptObject.GetProperty("border-style"); }
            set { ScriptObject.SetProperty("border-style", value); }
        }

        public string BorderTop
        {
            get { return (string)ScriptObject.GetProperty("border-top"); }
            set { ScriptObject.SetProperty("border-top", value); }
        }

        public string BorderTopColor
        {
            get { return (string)ScriptObject.GetProperty("border-top-color"); }
            set { ScriptObject.SetProperty("border-top-color", value); }
        }

        public string BorderTopWidth
        {
            get { return (string)ScriptObject.GetProperty("border-top-width"); }
            set { ScriptObject.SetProperty("border-top-width", value); }
        }

        public string BorderWidth
        {
            get { return (string)ScriptObject.GetProperty("border-width"); }
            set { ScriptObject.SetProperty("border-width", value); }
        }

        public string Clear
        {
            get { return (string)ScriptObject.GetProperty("clear"); }
            set { ScriptObject.SetProperty("clear", value); }
        }

        public string Display
        {
            get { return (string)ScriptObject.GetProperty("display"); }
            set { ScriptObject.SetProperty("display", value); }
        }

        public string Float
        {
            get { return (string)ScriptObject.GetProperty("float"); }
            set { ScriptObject.SetProperty("float", value); }
        }

        public string FontFamily
        {
            get { return (string)ScriptObject.GetProperty("font-family"); }
            set { ScriptObject.SetProperty("font-family", value); }
        }

        public string FontSize
        {
            get { return (string)ScriptObject.GetProperty("font-size"); }
            set { ScriptObject.SetProperty("font-size", value); }
        }

        public string FontStyle
        {
            get { return (string)ScriptObject.GetProperty("font-style"); }
            set { ScriptObject.SetProperty("font-style", value); }
        }

        public string FontVariant
        {
            get { return (string)ScriptObject.GetProperty("font-variant"); }
            set { ScriptObject.SetProperty("font-variant", value); }
        }

        public string FontWeight
        {
            get { return (string)ScriptObject.GetProperty("font-weight"); }
            set { ScriptObject.SetProperty("font-weight", value); }
        }

        public string LetterSpacing
        {
            get { return (string)ScriptObject.GetProperty("letter-spacing"); }
            set { ScriptObject.SetProperty("letter-spacing", value); }
        }

        public string LineHeight
        {
            get { return (string)ScriptObject.GetProperty("line-height"); }
            set { ScriptObject.SetProperty("line-height", value); }
        }

        public string ListStyle
        {
            get { return (string)ScriptObject.GetProperty("list-style"); }
            set { ScriptObject.SetProperty("list-style", value); }
        }

        public string ListStyleImage
        {
            get { return (string)ScriptObject.GetProperty("list-style-image"); }
            set { ScriptObject.SetProperty("list-style-image", value); }
        }

        public string ListStylePosition
        {
            get { return (string)ScriptObject.GetProperty("list-style-position"); }
            set { ScriptObject.SetProperty("list-style-position", value); }
        }

        public string ListStyleType
        {
            get { return (string)ScriptObject.GetProperty("list-style-type"); }
            set { ScriptObject.SetProperty("list-style-type", value); }
        }

        public double Margin
        {
            get { return (double)ScriptObject.GetProperty("margin"); }
            set { ScriptObject.SetProperty("margin", value); }
        }

        public double MarginBottom
        {
            get { return (double)ScriptObject.GetProperty("margin-bottom"); }
            set { ScriptObject.SetProperty("margin-bottom", value); }
        }

        public double MarginLeft
        {
            get { return (double)ScriptObject.GetProperty("margin-left"); }
            set { ScriptObject.SetProperty("margin-left", value); }
        }

        public double MarginRight
        {
            get { return (double)ScriptObject.GetProperty("margin-right"); }
            set { ScriptObject.SetProperty("margin-right", value); }
        }

        public double MarginTop
        {
            get { return (double)ScriptObject.GetProperty("margin-top"); }
            set { ScriptObject.SetProperty("margin-top", value); }
        }

        public double Padding
        {
            get { return (double)ScriptObject.GetProperty("padding"); }
            set { ScriptObject.SetProperty("padding", value); }
        }

        public double PaddingBottom
        {
            get { return (double)ScriptObject.GetProperty("padding-bottom"); }
            set { ScriptObject.SetProperty("padding-bottom", value); }
        }

        public double PaddingLeft
        {
            get { return (double)ScriptObject.GetProperty("padding-left"); }
            set { ScriptObject.SetProperty("padding-left", value); }
        }

        public double PaddingRight
        {
            get { return (double)ScriptObject.GetProperty("padding-right"); }
            set { ScriptObject.SetProperty("padding-right", value); }
        }

        public double PaddingTop
        {
            get { return (double)ScriptObject.GetProperty("padding-top"); }
            set { ScriptObject.SetProperty("padding-top", value); }
        }

        public string TextAlign
        {
            get { return (string)ScriptObject.GetProperty("text-align"); }
            set { ScriptObject.SetProperty("text-align", value); }
        }

        public string TextDecoration
        {
            get { return (string)ScriptObject.GetProperty("text-decoration"); }
            set { ScriptObject.SetProperty("text-decoration", value); }
        }

        public double TextIndent
        {
            get { return (double)ScriptObject.GetProperty("text-indent"); }
            set { ScriptObject.SetProperty("text-indent", value); }
        }

        public string TextTransform
        {
            get { return (string)ScriptObject.GetProperty("text-transform"); }
            set { ScriptObject.SetProperty("text-transform", value); }
        }

        public string VerticalAlign
        {
            get { return (string)ScriptObject.GetProperty("vertical-align"); }
            set { ScriptObject.SetProperty("vertical-align", value); }
        }

        public string WhiteSpace
        {
            get { return (string)ScriptObject.GetProperty("white-space"); }
            set { ScriptObject.SetProperty("white-space", value); }
        }

        public double Width
        {
            get { return (double)ScriptObject.GetProperty("width"); }
            set { ScriptObject.SetProperty("width", value); }
        }

        public double WordSpacing
        {
            get { return (double)ScriptObject.GetProperty("word-spacing"); }
            set { ScriptObject.SetProperty("word-spacing", value); }
        }

        public int ZIndex
        {
            get { return (int)ScriptObject.GetProperty("z-index"); }
            set { ScriptObject.SetProperty("z-index", value); }
        }

        public double Bottom
        {
            get { return (double)ScriptObject.GetProperty("bottom"); }
            set { ScriptObject.SetProperty("bottom", value); }
        }

        public double Right
        {
            get { return (double)ScriptObject.GetProperty("right"); }
            set { ScriptObject.SetProperty("right", value); }
        }
       
        protected override void SetProperties(Dictionary<string, object> properties)
        {
            foreach (KeyValuePair<string, object> keyValuePair in properties)
            {
                this[keyValuePair.Key] = keyValuePair.Value;
            }
        }

        public static implicit operator jQueryObjectCss(ScriptObject m)
        {
            return new jQueryObjectCss() { ScriptObject = m };
        }

        public static implicit operator ScriptObject(jQueryObjectCss m)
        {
            return m.ScriptObject;
        }

    }
}